/*
 * Copyright (c) 2009. Silenus Consultoria, S.L.
 */
package es.silenus.detecta.model;

import java.security.Principal;

import java.util.Locale;


/**
 * User principal.
 *
 * @author <a href="mailto:malonso@silenus-consultoria.es">Mariano Alonso</a>
 * @since 28-mar-2009 17:46:06
 */
public interface UserPrincipal extends Principal {
	/**
	 * Retrieves the locale.
	 *
	 * @return the locale.
	 */
	public Locale getLocale();

	/**
	 * Checks if a user is in the given role.
	 *
	 * @param role the role.
	 *
	 * @return true if user is in role, false otherwise.
	 */
	public boolean isUserInRole(final String role);

	/**
	 * Checks if the user is disabled or not.
	 *
	 * @return true if the user is disabled, false otherwise.
	 */
	public boolean isDisabled();
}
